/**
 * A block for forming basic platforms, etc.
 * 
 * @author bshelton
 * Dec 12, 2006
 *
 */

package games.platformer.entities;

import java.awt.geom.Dimension2D;
import java.awt.geom.Point2D;

public class PlatformBlock extends vooga.entities.Image
{
	private int myHealth;
	
	public PlatformBlock(Point2D topLeft, Dimension2D size, String image, boolean destructible)
	{
		super(topLeft, size, image);
		setDestructible(destructible);
	}
	
	public void setHealth(int health)
	{
		myHealth = health;
	}
	
	public int getHealth()
	{
		return myHealth;
	}
	
	public void reduceHealth()
	{
		if(isDestructible())
		{
			myHealth--;
		}
	}
	
}
